package Registration;

import java.sql.ResultSet;

import dbmanager.DBManager;

public class RemoveDuplicateMaster 
{
	public RemoveDuplicateMaster() 
	{
		DBManager db = new DBManager();
		db.getConnect();
		
		try 
		{
			
			ResultSet rs = db.getSelect("select * from transaction");
			while(rs.next())
			{
				String name = rs.getString("id");
				ResultSet rs1 = db.getSelect("select * from transaction where lower(id) = lower('"+name+"')");
				int counter=0;
				while(rs1.next())
				{
					counter++;
				}
				if(counter>1)
				{
					System.out.println("master "+name +" is reperated");
					break;
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public static void main(String[] args) {
		new RemoveDuplicateMaster();
	}
}
